package com.service.rebate.impl;

import com.bean.Rebate_record;
import com.dao.Rebate_recordMapper;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.service.core.AbstractService;
import com.service.rebate.RebateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;

/**
 * Created by lvjianqing on 2017/9/16.
 */
@Service
public class RebateServiceImpl extends AbstractService<Rebate_record, Integer> implements RebateService {
    @Autowired
    private Rebate_recordMapper rebate_recordMapper;

    @Override
    public Page findByPage(int pageNum, int pageSize, HashMap<String, Object> paraMap) {
        PageHelper.startPage(pageNum, pageSize);
        Page page = (Page) rebate_recordMapper.findByParaMap(paraMap);
        return page;
    }

    @Override
    public Page findRecordByPage(int pageNum, int pageSize, HashMap<String, Object> paraMap) {
        PageHelper.startPage(pageNum,pageSize);
        Page page = (Page) rebate_recordMapper.findRecordPage(paraMap);
        return page;
    }
}
